import React, { useEffect } from 'react'
import { Layout, Menu, Button, theme } from 'antd'
import TopHeader from '../../components/sandBox/TopHeader'
import SideMenu from '../../components/sandBox/SideMenu'
import { useNavigate } from 'react-router-dom'
import './sandBox.css'
import NewsRouter from '@/components/sandBox/NewsRouter'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

export default function NewsSandBox(props: any) {
  NProgress.start()
  useEffect(() => {
    console.log('触发')

    NProgress.done()
  })

  const {
    token: { colorBgContainer, borderRadiusLG }
  } = theme.useToken()
  console.log(props)
  const router = useNavigate()
  console.log('router', router)
  const { Header, Sider, Content } = Layout
  return (
    <Layout>
      <SideMenu></SideMenu>
      <Layout>
        <TopHeader></TopHeader>
        <Content
          style={{
            margin: '24px 16px',
            padding: 24,
            minHeight: 280,
            background: colorBgContainer,
            borderRadius: borderRadiusLG,
            overflow: 'auto'
          }}
        >
          <NewsRouter></NewsRouter>
        </Content>
      </Layout>
    </Layout>
  )
}
